###################################################
README File for replications materials:

Paper title: ''How Strong Are International Standards in Practice? Evidence from Cryptocurrency Transactions,'' Political Science Research and Methods

Author: Karen Nershi (knershi@middlebury.edu)
Date: April 7, 2025

###################################################
Overview:

This replication folder contains all necessary code to produce the results presented in the main text and supplementary materials for the paper listed above. This README file include information on:
 - Code (R scripts) including log files,
 - Data, and the
 - Computing Environment.

* To replicate these results, change the working directory to the correct location of the data files.

* Code to estimate bunching has been adapted from the "bunching" package in R by Panos Mavrokonstantis (2020). 

* One figure and two tables were not created using R code, and thus are not replicated in these materials. Figure 1 is an an illustration of the bunching method and was created in a slide editing software "by hand." Tables 7 presents a summary of the data pairs collected, and Table 8 was adapted from another source (as described in the Supplementary Materials).

###################################################
Description of Code Files (R Scripts):

Output for all code-generated tables and figures included in the main body of the text and supplementary materials are included in the following code files:
- "Bunching Analysis.R",
- "BVI Case Study.R", and 
- "Figures.R".

Each file begins by loading required packages and creating functions that are necessary for the analysis contained within the file. It then shows the code necessary for creating the output of each figure or table included in the code file. 

Log Files:

Log files, showing the full output for each code file, are also included. These files share the same name of the relevant code file but in PDF format (e.g., "Bunching Analysis.pdf"). These files were generated using R Markdown. The following log files are included:
- "Bunching Analysis.pdf",
- "BVI Case Study.pdf", and 
- "Figures.pdf".

###################################################
Data and organization:

The main analysis is completed with an original dataset collected by the author. The dataset is divided into several CSV files that are imported using the code. A complete description of each code file and the included variables is provided by an accompanying code book ("Codebook.pdf"). Each of the data CSV files are listed below along with their relevant code file and output.

+----------------------------------------------------------------------------+
|   Data for "How Strong Are International Standards in Practice?" (Nershi)  |
+-----------------------+--------------------------------------+-------------+
| Code File             | CSV Files                            | Output      |
+-----------------------+--------------------------------------+-------------+
| "Bunching Analysis.R" | - "reg_thresh_btc.csv"               | - Table 1   |
|                       | - "reg_thresh_eth.csv"               | - Table 2   |
|                       | - "unreg_btc.csv"                    | - Table 3   |
|                       | - "unreg_eth.csv"                    | - Table 4   |
|                       | - "full.reg.without.threshold.csv"   | - Table 9   |
+-----------------------+--------------------------------------+-------------+
|    "BVI Case Study.R" | - "full.BVI.btc.csv"                 | - Table 5   |
|                       | - "full.BVI.eth.csv"                 | - Table 6   |
|                       |                                      | - Figure 3  |
|                       |                                      | - Figure 4  |
|                       |                                      | - Table 10  |
|                       |                                      | - Table 11  |
|                       |                                      | - Table 12  |
+-----------------------+--------------------------------------+-------------+
|         "Functions.R" | - "binanceus.csv"                    | - Figure 2  |
|                       | - "coinmetro.csv"                    | - Figure 6  |
|                       | - "ab_coinsbit.csv"                  | - Figure 7  |
|                       | - "ab_cryptology.csv"                | - Figure 8  |
|                       | - "ab_folgory.csv"                   | - Figure 9  |
|                       | - "ab_whitebit.csv"                  | - Figure 10 |
|                       | - "regulated_btc_transactions.csv"   | - Figure 11 |
|                       | - "unregulated_btc_transactions.csv" | - Figure 12 |
|                       | - "regulated_eth_transactions.csv"   |             |
|                       | - "unregulated_eth_transactions.csv" |             |
+-----------------------+--------------------------------------+-------------+

###################################################
Computing Environment:

 - Analyses were run using R version 4.4.1
 - Required packages are listed at the top of each code file.


Analysis was run on a local machine with the following specifications:

Operating System: macOS 14.7.1 (23H222)
Memory: 16 GB


Session information:

R version 4.4.1 (2024-06-14)
Platform: aarch64-apple-darwin20
Running under: macOS Sonoma 14.7.1

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] ggridges_0.5.6   bunching_0.8.6   BB_2019.10-1     sandwich_3.1-1  
 [5] lmtest_0.9-40    zoo_1.8-14       stargazer_5.2.3  kableExtra_1.4.0
 [9] knitr_1.50       lubridate_1.9.4  forcats_1.0.0    stringr_1.5.1   
[13] dplyr_1.1.4      purrr_1.0.4      readr_2.1.5      tidyr_1.3.1     
[17] tibble_3.2.1     ggplot2_3.5.2    tidyverse_2.0.0 

loaded via a namespace (and not attached):
 [1] generics_0.1.4     xml2_1.3.8         stringi_1.8.7     
 [4] lattice_0.22-7     hms_1.1.3          digest_0.6.37     
 [7] magrittr_2.0.3     evaluate_1.0.3     grid_4.4.1        
[10] timechange_0.3.0   RColorBrewer_1.1-3 fastmap_1.2.0     
[13] viridisLite_0.4.2  scales_1.4.0       textshaping_1.0.1 
[16] cli_3.6.5          rlang_1.1.6        withr_3.0.2       
[19] tools_4.4.1        tzdb_0.5.0         vctrs_0.6.5       
[22] R6_2.6.1           lifecycle_1.0.4    pkgconfig_2.0.3   
[25] pillar_1.10.2      gtable_0.3.6       glue_1.8.0        
[28] systemfonts_1.2.3  xfun_0.52          tidyselect_1.2.1  
[31] rstudioapi_0.17.1  farver_2.1.2       htmltools_0.5.8.1 
[34] rmarkdown_2.29     svglite_2.2.1      compiler_4.4.1    
[37] quadprog_1.5-8   
 
###################################################